package com.mhg.thread;

public class DrinkThread  implements  Runnable{
    /**
     * 入口程序
     * @param args
     */
    public static void main(String[] args) {
        //创建喝水线程
        Thread t1 = new Thread(new DrinkThread());
        //启动线程
        t1.start();
    }

    /**
     * 线程具体的执行逻辑
     */
    @Override
    public void run() {
        for (int i =0;i<10;i++)
        System.out.println("喝第"+i+"次水！");
    }
}
